import math
from collections import Counter
from functools import lru_cache

MODE = 1e9+7
n = int(input())
nums = list(map(int, input().split()))
counter = Counter(nums)

